package day0728API;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.Socket;

public class C1_T  extends  Thread{
    Socket socket=null;
    C1_T(Socket s){
        this.socket=s;
    }

    public void run() {
        try {
            InputStream is=socket.getInputStream();
            InputStreamReader isr=new InputStreamReader(is);
            BufferedReader br=new BufferedReader(isr);
            String msg=null;
            while( (msg=br.readLine())!=null){
                System.out.println(msg);
            }
        }catch (IOException e){
            e.printStackTrace();
        }

    }
}
